package com.gnerv.pabu.plugin.annotation;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.vfs.VirtualFile;

public class AnnotationGroup extends DefaultActionGroup {
    @Override
    public void update(AnActionEvent event) {
        VirtualFile virtualFile = event.getData(CommonDataKeys.VIRTUAL_FILE);
        boolean directory = virtualFile.isDirectory();
        event.getPresentation().setEnabledAndVisible(!directory);
    }
}
